﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/MasterPage/User.Master"
    CodeBehind="BusinessOutlets.aspx.vb" Inherits="GoodAnotApp.BusinessOutlets" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSourceBusinessOutlets">
        <EditItemTemplate>
            <span style="">name:
                <asp:TextBox ID="nameTextBox" runat="server" Text='<%# Bind("name") %>' />
                <br />
                category:
                <asp:TextBox ID="categoryTextBox" runat="server" Text='<%# Bind("category") %>' />
                <br />
                website:
                <asp:TextBox ID="websiteTextBox" runat="server" Text='<%# Bind("website") %>' />
                <br />
                details:
                <asp:TextBox ID="detailsTextBox" runat="server" Text='<%# Bind("details") %>' />
                <br />
                Expr1:
                <asp:TextBox ID="Expr1TextBox" runat="server" Text='<%# Bind("Expr1") %>' />
                <br />
                address:
                <asp:TextBox ID="addressTextBox" runat="server" Text='<%# Bind("address") %>' />
                <br />
                opening_hours:
                <asp:TextBox ID="opening_hoursTextBox" runat="server" Text='<%# Bind("opening_hours") %>' />
                <br />
                remarks:
                <asp:TextBox ID="remarksTextBox" runat="server" Text='<%# Bind("remarks") %>' />
                <br />
                phone_no:
                <asp:TextBox ID="phone_noTextBox" runat="server" Text='<%# Bind("phone_no") %>' />
                <br />
                <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="Update" />
                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Cancel" />
                <br />
                <br />
            </span>
        </EditItemTemplate>
        <EmptyDataTemplate>
            <span>No data was returned.</span>
        </EmptyDataTemplate>
        <InsertItemTemplate>
            <span style="">name:
                <asp:TextBox ID="nameTextBox" runat="server" Text='<%# Bind("name") %>' />
                <br />
                category:
                <asp:TextBox ID="categoryTextBox" runat="server" Text='<%# Bind("category") %>' />
                <br />
                website:
                <asp:TextBox ID="websiteTextBox" runat="server" Text='<%# Bind("website") %>' />
                <br />
                details:
                <asp:TextBox ID="detailsTextBox" runat="server" Text='<%# Bind("details") %>' />
                <br />
                Expr1:
                <asp:TextBox ID="Expr1TextBox" runat="server" Text='<%# Bind("Expr1") %>' />
                <br />
                address:
                <asp:TextBox ID="addressTextBox" runat="server" Text='<%# Bind("address") %>' />
                <br />
                opening_hours:
                <asp:TextBox ID="opening_hoursTextBox" runat="server" Text='<%# Bind("opening_hours") %>' />
                <br />
                remarks:
                <asp:TextBox ID="remarksTextBox" runat="server" Text='<%# Bind("remarks") %>' />
                <br />
                phone_no:
                <asp:TextBox ID="phone_noTextBox" runat="server" Text='<%# Bind("phone_no") %>' />
                <br />
                <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" />
                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Clear" />
                <br />
                <br />
            </span>
        </InsertItemTemplate>
        <ItemTemplate>
            <table width="100%" class="bordered-table">
                <tr>
                    <td colspan="6">
                        <h3>
                            <asp:Label ID="lblBusinessName" runat="server" Text='<%# Eval("name") %>' Font-Bold="True"
                                ForeColor="#D12020"></asp:Label>
                        </h3>
                    </td>
                </tr>
                <tr>
                    <td colspan="3" rowspan="3">
                        <asp:Image ID="imgBusiness" Style="margin-left: 70px" class="media-gridImg" runat="server"
                            Height="150px" Width="210px" />
                    </td>
                    <td width="145px" height="20px">
                        <h5>
                            Category</h5>
                    </td>
                    <td width="12px">
                        <h5>
                            :</h5>
                    </td>
                    <td width="300px" valign="middle" style="padding-top: 20px">
                        <asp:Label ID="lblCategory" runat="server" Text='<%# Eval("category") %>'></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td width="145px" height="20px">
                        <h5>
                            Website</h5>
                    </td>
                    <td width="12px">
                        <h5>
                            :</h5>
                    </td>
                    <td valign="middle" style="padding-top: 20px">
                        <asp:LinkButton ID="lbWebsite" runat="server" PostBackUrl='<%# Eval("website") %>'>Click here</asp:LinkButton>
                    </td>
                </tr>
                <tr>
                    <td width="145px" height="20px" valign="top">
                        <h5>
                            Details</h5>
                        &nbsp;
                    </td>
                    <td width="12px" valign="top">
                        <h5>
                            :</h5>
                        &nbsp;
                    </td>
                    <td valign="top">
                        <asp:TextBox ID="tbxDetails" runat="server" Style="resize: none;" Height="64px" ReadOnly="True"
                            TextMode="MultiLine" Width="270px" Text='<%# Eval(&quot;details&quot;) %>'></asp:TextBox>
                        &nbsp;
                    </td>
                </tr>
            </table>
            <%--<span style="">name:
            <asp:Label ID="nameLabel" runat="server" Text='<%# Eval("name") %>' />
            <br />
            category:
            <asp:Label ID="categoryLabel" runat="server" Text='<%# Eval("category") %>' />
            <br />
            website:
            <asp:Label ID="websiteLabel" runat="server" Text='<%# Eval("website") %>' />
            <br />
            details:
            <asp:Label ID="detailsLabel" runat="server" Text='<%# Eval("details") %>' />
            <br />
            Expr1:
            <asp:Label ID="Expr1Label" runat="server" Text='<%# Eval("Expr1") %>' />
            <br />
            address:
            <asp:Label ID="addressLabel" runat="server" Text='<%# Eval("address") %>' />
            <br />
            opening_hours:
            <asp:Label ID="opening_hoursLabel" runat="server" 
                Text='<%# Eval("opening_hours") %>' />
            <br />
            remarks:
            <asp:Label ID="remarksLabel" runat="server" Text='<%# Eval("remarks") %>' />
            <br />
            phone_no:
            <asp:Label ID="phone_noLabel" runat="server" Text='<%# Eval("phone_no") %>' />
            <br />--%>
            <br />
            </span>
        </ItemTemplate>
        <LayoutTemplate>
            <div id="itemPlaceholderContainer" runat="server" style="">
                <span runat="server" id="itemPlaceholder" />
            </div>
            <div style="">
                <asp:DataPager ID="DataPager1" runat="server">
                    <Fields>
                        <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" ShowNextPageButton="False"
                            ShowPreviousPageButton="False" />
                        <asp:NumericPagerField />
                        <asp:NextPreviousPagerField ButtonType="Button" ShowLastPageButton="True" ShowNextPageButton="False"
                            ShowPreviousPageButton="False" />
                    </Fields>
                </asp:DataPager>
            </div>
        </LayoutTemplate>
        <SelectedItemTemplate>
            <span style="">name:
                <asp:Label ID="nameLabel" runat="server" Text='<%# Eval("name") %>' />
                <br />
                category:
                <asp:Label ID="categoryLabel" runat="server" Text='<%# Eval("category") %>' />
                <br />
                website:
                <asp:Label ID="websiteLabel" runat="server" Text='<%# Eval("website") %>' />
                <br />
                details:
                <asp:Label ID="detailsLabel" runat="server" Text='<%# Eval("details") %>' />
                <br />
                Expr1:
                <asp:Label ID="Expr1Label" runat="server" Text='<%# Eval("Expr1") %>' />
                <br />
                address:
                <asp:Label ID="addressLabel" runat="server" Text='<%# Eval("address") %>' />
                <br />
                opening_hours:
                <asp:Label ID="opening_hoursLabel" runat="server" Text='<%# Eval("opening_hours") %>' />
                <br />
                remarks:
                <asp:Label ID="remarksLabel" runat="server" Text='<%# Eval("remarks") %>' />
                <br />
                phone_no:
                <asp:Label ID="phone_noLabel" runat="server" Text='<%# Eval("phone_no") %>' />
                <br />
                <br />
            </span>
        </SelectedItemTemplate>
    </asp:ListView>
    <asp:SqlDataSource ID="SqlDataSourceBusinessOutlets" runat="server" ConnectionString="<%$ ConnectionStrings:yijungoodAnotDBConnectionString %>"
        SelectCommand="SELECT business.name, business.category, business.website, business.details, outlet.name AS Expr1, outlet.address, outlet.opening_hours, outlet.remarks, outlet.phone_no FROM business INNER JOIN outlet ON business.business_ID = outlet.business_ID WHERE (outlet.outlet_ID = @outlet_ID)">
        <SelectParameters>
            <asp:Parameter Name="outlet_ID" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
</asp:Content>
